package com.example.demo.controller;

import com.example.demo.entity.User;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = "test1")
public class Receiver1 {

    @RabbitHandler
    public void  recevier(String msg){
        System.out.println("Test1 receiver1:"+msg);
    }
    @RabbitHandler
    public void  recevier2(User user){
        System.out.println(user.toString());
    }


}